<template>
    <div>
        <el-form :model="data" size="small">
            <el-form-item label="用户">
                <el-input v-model="data.account"></el-input>
            </el-form-item>
            <el-form-item label="密码">
                <el-input type="password" v-model="data.password"></el-input>
            </el-form-item>
        </el-form>
        <el-button @click="login" type="primary" size="small">登录</el-button>
    </div>
</template>
<script>
import { defineComponent, ref } from "vue";
import { _ } from "../util";
import user from "../user";
export default defineComponent({
    name: "Login",
    setup() {
        let data = ref({ account: "123123123", password: "12312332" });
        const login = () => {
            user.login(data.value);
        };
        return {
            data,
            login,
        };
    },
    data() {
        return {};
    },
});
</script>
